package com.chen.controller;

import com.chen.utils.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.Date;

@RestController
@RequestMapping(value = "/open")
public class OpenController {


    // http://127.0.0.1:8080/mysql/open/runStatus
    @GetMapping(value = "/runStatus")
    public R runStatus(){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String time = sdf.format(new Date());
        return R.success(time);
    }

}
